CC=aarch64-poky-linux-gcc

CFLAGS_=-I /opt/poky/5.0.1/sysroots/cortexa57-poky-linux/usr/include/
CFLAGS_ += -I /opt/poky/5.0.1/sysroots/cortexa57-poky-linux/usr/include/libdrm/
LDFLAGS_=-L /opt/poky/5.0.1/sysroots/cortexa57-poky-linux/usr/lib

#CFLAGS_=-I /home/cambricon/work/DRM-Test/libdrm-2.4.115/install/include/
#CFLAGS_ += -I /home/cambricon/work/DRM-Test/libdrm-2.4.115/install/include/libdrm/
#LDFLAGS_=-L /home/cambricon/work/DRM-Test/libdrm-2.4.115/install/lib


FLAGS=-O0 -g -ldrm -lrt --sysroot=/opt/poky/5.0.1/sysroots/cortexa57-poky-linux/
all:
#	$(CC) $(CFLAGS_) $(LDFLAGS_) $(FLAGS)  modeset-single-buffer.c -o modeset
	$(CC) $(CFLAGS_) $(LDFLAGS_) $(FLAGS)  dmabuf-sharing.c -o dmabuf-sharing
.PHONY: clean
clean:
	rm -f *.o dmabuf-sharing

